package org.jeecg.modules.wms.service;

import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.wms.entity.WmsInboundOrderDetail;

import java.util.List;

/**
 * 入库单明细服务接口
 */
public interface IWmsInboundOrderDetailService extends IService<WmsInboundOrderDetail> {
    
    /**
     * 根据入库单ID查询明细列表
     */
    List<WmsInboundOrderDetail> listByInboundOrderId(String inboundOrderId);
    
    /**
     * 批量保存入库单明细
     */
    boolean batchSaveDetails(List<WmsInboundOrderDetail> details);
    
    /**
     * 根据入库单ID删除明细
     */
    boolean deleteByInboundOrderId(String inboundOrderId);

    /**
     * 更新入库单明细
     */
    boolean updateDetail(WmsInboundOrderDetail detail);
    
    /**
     * 根据入库单ID和物料编码查询明细列表
     * @param inboundOrderId 入库单ID
     * @param materialCode 物料编码
     * @return 明细列表
     */
    List<WmsInboundOrderDetail> listByInboundOrderIdAndMaterialCode(String inboundOrderId, String materialCode);

    List<WmsInboundOrderDetail> listByInboundOrderIdAndUpdateBy(String id, String username);
} 